package com.js.common.util;

import com.js.common.constant.RedisKeyConstants;
import com.js.core.constants.CommonConstants;

import java.util.Date;

/**
 * @author： ygl
 * @date： 2018/10/28
 * @Description：
 */
public class RedisKeyUtil {

    /**
     *
     * @param userId
     * @param expire
     * @return
     */
    public static String buildUserAbleKey(String userId, Date expire){
        return CommonConstants.REDIS_USER_TOKEN + RedisKeyConstants.USER_ABLE + userId + ":" + expire.getTime();
    }

    /**
     *
     * @param userId
     * @param expire
     * @return
     */
    public static String buildUserDisableKey(String userId,Date expire){
        return CommonConstants.REDIS_USER_TOKEN + RedisKeyConstants.USER_DISABLE + userId + ":" + expire.getTime();
    }
}
